import request from '@/config/axios'

export interface DrawingProcessTemplateVO {
  id: number
  templateCode: string
  productType: string
  dictTemplateStatus: number
}

// 查询流程单模板列表
export const getDrawingProcessTemplatePage = async (params) => {
  return await request.get({ url: `/config/drawing-process-template/page`, params })
}

// 查询流程单模板详情
export const getDrawingProcessTemplate = async (id: number) => {
  return await request.get({ url: `/config/drawing-process-template/get?id=` + id })
}

// 新增流程单模板
export const createDrawingProcessTemplate = async (data) => {
  return await request.post({ url: `/config/drawing-process-template/create`, data })
}

// 修改流程单模板
export const updateDrawingProcessTemplate = async (data) => {
  return await request.put({ url: `/config/drawing-process-template/update`, data })
}

// 删除流程单模板
export const deleteDrawingProcessTemplate = async (id: number) => {
  return await request.delete({ url: `/config/drawing-process-template/delete?id=` + id })
}

// 导出流程单模板 Excel
export const exportDrawingProcessTemplate = async (params) => {
  return await request.download({ url: `/config/drawing-process-template/export-excel`, params })
}

// 查询产品
export const getDropDown = async () => {
  return await request.get({ url: 'config/drawing-component/list-all-simple' })
}

// 导出流程单模板 Excel
export const exportParamsConf = async (params) => {
  return await request.download({ url: `/config/drawing-process-verify-params-conf/export-excel`, params })
}

// 删除流程单模板子数据
export const deleteDrawingProcessConf= async (id: number) => {
  return await request.delete({ url: `/config/drawing-process-verify-params-conf/delete?id=` + id })
}